package com.qtt.app.mapper;

import com.qtt.app.entity.AppTeacher;
import com.qtt.app.entity.Teachers;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface TeachersMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Teachers record);

    int insertSelective(Teachers record);

    Teachers selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Teachers record);

    int updateByPrimaryKeyWithBLOBs(Teachers record);

    int updateByPrimaryKey(Teachers record);

    Teachers getTeacherById (@Param("id") Integer id);

    @Select("SELECT id FROM teachers ORDER BY id DESC LIMIT 1")
    int getLastId();//查找最后添加的id，用于添加数据后返回id

    List<Teachers> getRecommendTeachers();
}